import request from '@/config/axios'

export interface WarehouseArchivesVO {
  id: number
  warehouseCode: string
  warehouseName: string
  deptId: number
  deptName: string
  dictWarehouseAttribute: number
  warehousePosition: string
  dictEnableStatus: number
  remark: string
}

// 查询配置中心--生产仓库--仓库档案列表
export const getWarehouseArchivesPage = async (params) => {
  return await request.get({ url: `/config/warehouse-archives/page`, params })
}

// 查询配置中心--生产仓库--仓库档案详情
export const getWarehouseArchives = async (id: number) => {
  return await request.get({ url: `/config/warehouse-archives/get?id=` + id })
}

// 新增配置中心--生产仓库--仓库档案
export const createWarehouseArchives = async (data: WarehouseArchivesVO) => {
  return await request.post({ url: `/config/warehouse-archives/create`, data })
}

// 修改配置中心--生产仓库--仓库档案
export const updateWarehouseArchives = async (data: WarehouseArchivesVO) => {
  return await request.put({ url: `/config/warehouse-archives/update`, data })
}

// 删除配置中心--生产仓库--仓库档案
export const deleteWarehouseArchives = async (id: number) => {
  return await request.delete({ url: `/config/warehouse-archives/delete?id=` + id })
}

// 导出配置中心--生产仓库--仓库档案 Excel
export const exportWarehouseArchives = async (params) => {
  return await request.download({ url: `/config/warehouse-archives/export-excel`, params })
}
